const { testFc, name } = require('./index.js');

describe(name, () => {
  test('A. 数组相等', () => {
    expect((() => [1, 2, 3])()).toEqual([1, 2, 3]);
  });

  test('B. 3x3', () => {
    expect(
      testFc([
        [1, 2, 3],
        [4, 5, 6],
        [7, 8, 9],
      ])
    ).toEqual([
      [7, 4, 1],
      [8, 5, 2],
      [9, 6, 3],
    ]);
  });

  test('C. 4x4', () => {
    expect(
      testFc([
        [
          [5, 1, 9, 11],
          [2, 4, 8, 10],
          [13, 3, 6, 7],
          [15, 14, 12, 16],
        ],
      ])
    ).toEqual([
      [15, 13, 2, 5],
      [14, 3, 4, 1],
      [12, 6, 8, 9],
      [16, 7, 10, 11],
    ]);
  });
});
